home *** CD-ROM | disk | FTP | other *** search
- Path: stc06.ctd.ornl.gov!msr!kennel
- From: kennel@msr.epm.ornl.gov (Matt Kennel)
- Newsgroups: comp.lang.c++,comp.lang.c
- Subject: Re: Performance: C vs. C++
- Followup-To: comp.lang.c++,comp.lang.c
- Date: 15 Feb 1996 17:41:08 GMT
- Organization: Oak Ridge National Lab, Oak Ridge, TN
- Message-ID: <4fvr7k$a3l@stc06.ctd.ornl.gov>
- References: <30F6BAAC.12B5@iastate.edu> <4da9pn$a45@news.bridge.net> <4dnpl2$c8g@classic.iinet.com.au> <3105E9DC.1BE3@enermet.fi> <DLr46y.7rH@txnews.amd.com> <4elk5l$3f2q@yuma.ACNS.ColoState.EDU> <pronet01.31.003EB1E6@indirect.com> <3117F980.7890@hpato.aus.hp.com> <4fgd62$asb@gaia.ns.utk.edu> <4frur0$73t@adam.telalink.net>
- NNTP-Posting-Host: msr.epm.ornl.gov
- X-Newsreader: TIN [version 1.2 PL2]
-
- >David Rawle (daver@nashville.net) wrote:
- (Actually it was me)
- > >
- > > 1) A linguistic mechanism to say "this is not a
- > dispatched
- > > pointer". I think it's a flaw to forcibly connect
- > > reference semantics with dispatchability.
- > >
-
- > What is a "dispatched pointer"?
-
- In C++ it would be a pointer to a base class which has 'virtual members',
- where the particular function called is chosen by the actual run-time
- type.
-
- In C++, if you have a pointer, then it is always conceivably dispatched,
- unless everything in the class is declared "static".
-
- So here "reference semantics" (going through a pointer, a storage area
- potentially aliased) are joined with "dispatchability".
-
- I personally prefer langauges where the *user* of the pointer can say:
-
- This is a pointer to class X or any of its compatible descendents.
- This is a pointer to exactly class X.
-
- (viz Sather)
-
- cheers
- Matt
-
-